<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link href="__PUBLIC__/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
    <link href="__PUBLIC__/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link href="__PUBLIC__/css/animate.min.css" rel="stylesheet">
    <link href="__PUBLIC__/css/style.min.css?v=4.1.0" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/css/fileinput/fileinput.css">
</head>

<body class="gray-bg">

<div class="wrapper wrapper-content animated fadeInLeft">
    <div class="row" id="form">
        <div class="col-sm-12">
            <div class="ibox">

                <div class="ibox-content">
                    <form method="post" action="" class="form-horizontal" id="valid_form">


                        <div class="hr-line-dashed"></div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label">excel文件:</label>
                            <div class="col-sm-10">
                                <input type="file" name="file" id="file" multiple class="file-loading">
                            </div>
                        </div>

                    </form>
                </div>
            </div>
        </div>
    </div>
</div>

<script src="__PUBLIC__/js/jquery.min.js?v=2.1.4"></script>
<script src="__PUBLIC__/js/bootstrap.min.js?v=3.3.6"></script>
<script src="__PUBLIC__/js/layui/layui.all.js"></script>
<script src="__PUBLIC__/js/vue.js"></script>
<script src="__PUBLIC__/js/vue-resource.js"></script>
<script src="__PUBLIC__/js/fileinput/fileinput.js"></script>
<script src="__PUBLIC__/js/fileinput/fileinput_locale_zh.js"></script>
<script>

    $('#file').fileinput({
        language:'zh',
        uploadUrl: '../SendMessage/SendAll',
        allowedFileExtensions: ['xlsx','xls'],
        showUpload: true,
        showCaption: false,
        browseClass: 'btn btn-primary',
        maxFileCount: 10,
    }).on('filebatchselected', function (event, data, id, index) {
        $(this).fileinput("upload");
    }).on("fileuploaded", function(event, data) {
        if (data.result==='success')
            layer.msg('上传成功')
    });
</script>
</body>
</html>
